{template 'common/header'}
<ul class="nav nav-tabs">
	<li {if $act == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('invitelist');}">邀请列表</a></li>
	{if $act == 'detail'}<li class="active"><a href="{php echo $this->createWebUrl('invitelist', array('act'=>'detail', 'uid'=>$uid));}">详情</a></li>{/if}
</ul>
{if $act=='display'}
<!--<div class="panel panel-info">-->
	<!--<div class="panel-heading">筛选</div>-->
	<!--<div class="panel-body">-->
		<!--<form action="" method="post" class="form-horizontal" role="form">-->
			<!--<div class="form-group">-->
				<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">昵称(uid)</label>-->
				<!--<div class="col-sm-6 col-md-8 col-lg-8 col-xs-12">-->
					<!--<input type="text" class="form-control" name="uid" placeholder="请输入昵称或UID" value="{$_GPC['uid']}" />-->
				<!--</div>-->
			<!--<div class="form-group">-->
				<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>-->
				<!--<div class="col-sm-6 col-md-8 col-lg-8 col-xs-12">-->
					<!--<button type="submit" class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>-->
					<!--<input type="hidden" name="token" value="{$_W['token']}" />-->
				<!--</div>-->
			<!--</div>-->
		<!--</form>-->
	<!--</div>-->
<!--</div>-->
<div class="panel panel-default ">
	<div class="table-responsive panel-body">
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr>
				<th width="300">昵称/头像</th>
				<th>邀请数</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			{if $list}
			{loop $list $li}
			<tr>
				<td>
					<div class="clearfix">
						<div class="pull-left" style="width: 40px;height: 40px; overflow: hidden; border-radius: 50%;">
							<img src="{php echo tomedia($li['member']['avatar'])}" onerror="this.src='../app/resource/images/heading.jpg'" style="width: 100%" />
						</div>
						<div class="pull-left" style="line-height: 40px; margin-left: 10px;">
							{if $li['member']['nickname']!=''}{$li['member']['nickname']}{else}{$li['uid']}{/if}
						</div>
					</div>
				</td>
				<td>{$li['total']}</td>
				<td><a href="{php echo $this->createWebUrl('invitelist', array('act' => 'detail', 'uid' => $li['uid']))}">详情</a></td>
			</tr>
			{/loop}
			{else}
			<tr>
				<td>暂时没有数据</td>
			</tr>
			{/if}
			</tbody>
		</table>
	</div>
</div>
{$pager}
{else if $act = 'detail'}
<div class="panel panel-default ">
	<div class="table-responsive panel-body">
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr>
				<th width="300">昵称/头像</th>
				<th>被邀时间</th>
			</tr>
			</thead>
			<tbody>
			{loop $list $li}
			<tr>
				<td>
					<div class="clearfix">
						<div class="pull-left" style="width: 40px;height: 40px; overflow: hidden; border-radius: 50%;">
							<img src="{php echo tomedia($li['friend']['avatar'])}" onerror="this.src='../app/resource/images/heading.jpg'" style="width: 100%" />
						</div>
						<div class="pull-left" style="line-height: 40px; margin-left: 10px;">
							{if $li['friend']['nickname']!=''}{$li['friend']['nickname']}{else}{$li['uid']}{/if}
						</div>
					</div>
				</td>
				<td>{$li['dateline']}</td>
			</tr>
			{/loop}
			</tbody>
		</table>
	</div>
</div>
{/if}
{template 'common/footer'}